import PySpice

motors=PySpice.getvar('motornames')
motoralias=PySpice.getvar('motoralias')
motorpos=PySpice.getvar('motorpositions')
motorzero=PySpice.getvar('motorzeros')

icount=0

header1='Motor Names'
header2='Motor Alias'
header3='Soft. Angle'
header4='Zero'
header5='Hard. Angle'

outstring = "%13s %13s %13s %13s %13s\n" % (header1, header2, header3, header4, header5)

for item in motors:
    outstring=outstring+ "%13s %13s %13g %13g %13g\n" % (item, motoralias[icount], motorpos[icount], motorzero[icount], motorpos[icount]+motorzero[icount])
    icount+=1

print outstring
print "\n Motor information completed."
    
